import request from '@/utils/request'

export const getChat = (messageContent) => {
  return request({
    method: 'GET',
    url: '/aliyun/ask',
    params: {
      inputValue:messageContent
    }
  })
}

export const saveHistory = (historyData) => {
  return request({
    url: '/bl/historychat',
    method: 'POST',
    data: {
      userId: historyData.userId,
      chatId: historyData.chatId,
      ask: historyData.ask,
      request: historyData.request.replace(/\n/g, ' ').trim()
    }
  })
}